<template>
  <div>
    <div class="touxiang">
      <div class="touxiang1 to">
        <div class="touxiang2" @click="fax()">
          <i class="iconfont icon-ziyuan87"></i>
        </div>
        <span class="fax"> <router-link to="/tj">发现好友</router-link> </span>
      </div>

      <div class="touxiang1" v-for="(v, i) in arr" :key="i" @click="zhuy()">
        <div><img :src="v.musicianPic" /></div>
        <span>{{ v.musicianName | musicianName }}</span>
      </div>
    </div>
    <Zy />
  </div>
</template>

<script>
import { getlink } from "../../../api/getlink";
import Zy from "./zhuye.vue";
export default {
  components: {
    Zy,
  },
  methods: {
    fax() {
      this.$router.push("/tj");
    },
    zhuy() {
      this.$router.push("/jinzhu");
    },
  },
  data() {
    return {
      arr: [],
    };
  },
  mounted() {
    getlink("/proxy/follow/findTop").then((ok) => {
      this.arr = ok.data.data;
    });
    // mounted() {
    //   getlink("/api/ho").then((ok) => {
    //     console.log(ok.data);
    //     this.arr = ok.data;
    //   });
  },
  filters: {
    musicianName(val) {
      if (val.length > 3) {
        return val.substr(0, 3) + "..";
      } else {
        return val;
      }
    },
  },
};
</script>

<style scoped>
.touxiang {
  width: 100%;
  height: 2.42rem;
  border-bottom: 2px solid #eceaeb;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  display: flex;
  /* justify-content: space-between;
  align-items: center; */
  overflow: auto;
}
.touxiang > div {
  width: 1.18rem;
  height: 1.18rem;
  padding: 0.03rem;
  border-radius: 50%;
  border: 0.04rem solid #f63734;
  text-align: center;
  color: #5f5d5e;
  font-size: 0.23rem;
}
.touxiang > .to {
  border: none;
}
.touxiang2 {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;

  background-color: rgb(207, 183, 183);
  text-align: center;
  line-height: 1.05rem;
}
.icon-ziyuan87 {
  color: #fffeff;
  font-size: 0.5rem;
}
img {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
}
span {
  display: inline-block;
  margin-top: 0.11rem;
}
.touxiang1 {
  /* overflow: auto; */
  margin-left: 0.27rem;
}
a {
  color: #5f5d5e;
  font-size: 0.23rem;
}
</style>